% Vivian Chu
% 29 Nov 2011
% CIS 520 Project

function [ratio] = make_helpful(data)
% Takes in "helpful" category and turns it into a ratio to be used later
% as training data.

for i = 1:numel(data)
    helpfulString{i} = data(i).helpful;
end

for i = 1:numel(helpfulString)
    vals = regexp(helpfulString{i},' ','split');
    if numel(vals) < 3
        ratio(i) = -1;
    else
        ratio(i) = str2double(vals(1))/str2double(vals(3));
    end
end

ratio = ratio';

